package com.loong.controller;

import com.loong.entity.JobOption;
import com.loong.entity.StudentCountOption;
import com.loong.result.Result;
import com.loong.service.ReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/report")
public class ReportController {
    @Autowired
    private ReportService reportService;

    @GetMapping("/empJobData")
    public Result<JobOption> getJobOption() {
        return Result.success(reportService.getJobData());
    }

    @GetMapping("/empGenderData")
    public Result<List<Map<String, Object>>> getGenderOption() {
        return Result.success(reportService.getGenderData());
    }

    @GetMapping("/studentDegreeData")
    public Result<List<Map<String, Object>>> getDegreeOption() {
        return Result.success(reportService.getDegreeData());
    }

    @GetMapping("/studentCountData")
    public Result<StudentCountOption> getCountOption() {
        return Result.success(reportService.getStudentCountData());
    }
}
